home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / prodor31.arc / PRO-X.BAT < prev    next >
DOS Batch File  |  1989-10-08  |  2KB  |  94 lines

  1. @echo off
  2. echo off
  3. rem -- pro-x.bat - process "extract member" archive request - for ProDOOR 3.1
  4. rem -- %1-resultfile, %2 sourcefile, %3 destfile, %4..%9 memberfiles
  5.  
  6. chkpath testfile %0 >>%1
  7. if errorlevel 1 goto end
  8. testfile %2 arc zip pak lzh zoo
  9. if errorlevel == 98 goto cant_handle
  10. if errorlevel == 5 goto zoo
  11. if errorlevel == 4 goto lzh
  12. if errorlevel == 3 goto pak
  13. if errorlevel == 2 goto zip
  14. if errorlevel == 1 goto arc
  15. goto end
  16.  
  17. :zoo
  18. chkpath zoo %0 >>%1
  19. if errorlevel 1 goto end
  20. mkdir $$$$
  21. cd $$$$
  22. zoo -extract >>%1 %2 %4 %5 %6 %7 %8 %9
  23. cd ..
  24. if errorlevel 1 goto pack_error
  25. cd $$$$
  26. zoo -move >>%1 %3 %4 %5 %6 %7 %8 %9
  27. cd ..
  28. if errorlevel 1 goto pack_error
  29. echo Y|del $$$$ >nul
  30. rmdir $$$$
  31. goto end
  32.  
  33. :arc
  34. chkpath proxtra %0 >>%1
  35. if errorlevel 1 goto end
  36. proxtra >>%1 %2 %3 %4 %5 %6 %7 %8 %9
  37. if errorlevel 1 goto error
  38. goto end
  39.  
  40. :zip
  41. chkpath proxzip %0 >>%1
  42. if errorlevel 1 goto end
  43. proxzip >>%1 %2 %3 %4 %5 %6 %7 %8 %9
  44. if errorlevel 1 goto error
  45. goto end
  46.  
  47. :pak
  48. chkpath pak %0 >>%1
  49. if errorlevel 1 goto end
  50. mkdir $$$$
  51. cd $$$$
  52. pak e /wn >>%1 %2 %4 %5 %6 %7 %8 %9
  53. cd ..
  54. if errorlevel 1 goto pack_error
  55. cd $$$$
  56. pak m >>%1 %3 %4 %5 %6 %7 %8 %9
  57. cd ..
  58. if errorlevel 1 goto pack_error
  59. echo Y|del $$$$ >nul
  60. rmdir $$$$
  61. goto end
  62.  
  63. :lzh
  64. chkpath lharc %0 >>%1
  65. if errorlevel 1 goto end
  66. mkdir $$$$
  67. cd $$$$
  68. lharc e /v /m >>%1 %2 %4 %5 %6 %7 %8 %9
  69. cd ..
  70. if errorlevel 1 goto pack_error
  71. cd $$$$
  72. lharc m /v >>%1 %3 %4 %5 %6 %7 %8 %9
  73. cd ..
  74. if errorlevel 1 goto pack_error
  75. echo Y|del $$$$ >nul
  76. rmdir $$$$
  77. goto end
  78.  
  79. :pack_error
  80. echo Y|del $$$$ >nul
  81. rmdir $$$$
  82. goto error
  83.  
  84. :error
  85. echo. >>%1
  86. echo %0: Error creating %3 ! >>%1
  87. echo The system is either low on disk space or memory. >>%1
  88. goto end
  89.  
  90. :cant_handle
  91. echo Sorry, %0 does not know how to process %2 ! >>%1
  92.  
  93. :end
  94.